924562829b3fb46e92995ea33a40b4f77c57aa1a,clients/unshaded/src/main/java/tachyon/client/file/policy/LocalFirstPolicy.java,LocalFirstPolicy,getWorkerForNextBlock,#List#number#,42
Before Change
// otherwise randomly pick a worker that has enough availability
Collections.shuffle(workerInfoList);
for (BlockWorkerInfo workerInfo : workerInfoList) {
if (workerInfo.getCapacityBytes() - workerInfo.getUsedBytes() > blockSizeBytes) {
return workerInfo.getNetAddress();
}
}
After Change
// otherwise randomly pick a worker that has enough availability
Collections.shuffle(workerInfoList);
for (BlockWorkerInfo workerInfo : workerInfoList) {
if (workerInfo.getCapacityBytes() >= blockSizeBytes) {
return workerInfo.getNetAddress();
}
}